package com.redoor.app.stake.workflow.dao;

import com.redoor.app.stake.workflow.model.BaseWorkorder;
import com.redoor.app.stake.workflow.model.controllerModel.WorkOrderCriteria;
import com.redoor.app.stake.workflow.model.serviceModel.BaseWorkOrderServiceBean;
import com.redoor.app.stake.workflow.model.serviceModel.WorkOrderNumBean;
import com.redoornetwork.framework.mybatis.mapper.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BaseWorkorderMapper extends Mapper<BaseWorkorder> {
    /**
     *  查询工单列表
     *      已办工单和待办工单按照传参不同调用这方法
     *
     * @author ZhangMumu
     * @date 2018/3/30 0030 19:30
     * @param
     * @return
     */
    List<BaseWorkOrderServiceBean> qryWorkOrder(WorkOrderCriteria workOrderCriteria);
    /**  
     *  查询工单列表的数量
     *      已办工单和待办工单按照传参不同调用这方法
     *
     * @author ZhangMumu  
     * @date 2018/3/30 0030 19:53
     * @param   
     * @return   
     */  
    int qryWorkOrderNum(WorkOrderCriteria workOrderCriteria);
    /**
     *  通过目标uuid查维护工单,时间倒序排列
     *
     * @author ZhangMumu
     * @date 2018/4/9 0009 10:19
     * @param
     * @return
     */
    List<BaseWorkorder> findMainApplyByTargetUuid(String targetUuid);
    /**  
     *  通过目标uuid查维护审核工单,时间倒序排列  
     *   
     * @author ZhangMumu  
     * @date 2018/4/10 0010 10:19
     * @param   
     * @return   
     */  
    List<BaseWorkorder> findMainChargeByTargetUuid(String targetUuid);
    /**  
     *  获取工单数量统计
     *   
     * @author ZhangMumu  
     * @date 2018/4/19 0019 16:07
     * @param
     * @return
     */  
    WorkOrderNumBean countWorkOrderNum(WorkOrderCriteria workOrderCriteria);
}